package com.bhkj.pdjhbgnewproject.common.work;

import android.content.Context;
import android.support.annotation.NonNull;

import androidx.work.Worker;
import androidx.work.WorkerParameters;

import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.LogUtils;

import java.util.Calendar;

/**
 * 每日执行定时任务
 * 7点-8点执行清除日志业务
 */
public class RelauncherAppWork extends Worker {

    public RelauncherAppWork(Context context, WorkerParameters workerParams) {
        super(context, workerParams);
    }

    @NonNull
    @Override
    public Result doWork() {
        relauncherApp();
        return Result.success();
    }



    private void relauncherApp() {
        AppUtils.relaunchApp(true);
    }


}
